package com.frame.demo.util;

import android.widget.Toast;

import com.frame.demo.app.MyApplication;


/**
 * Created by bingo on 2015/5/18.
 */
public class PromptUtil {
    private static Toast mToast = null;
    public static void showNormalToast(String text) {
        if (mToast != null) {
            mToast.cancel();
        }
        mToast = Toast.makeText(MyApplication.getInstance(), text, Toast.LENGTH_SHORT);
        mToast.setText(text);
        mToast.show();
    }

    public static void showNormalToast(int textResId) {
        if (mToast != null) {
            mToast.cancel();
        }
        mToast = Toast.makeText(MyApplication.getInstance(), textResId, Toast.LENGTH_SHORT);
        mToast.setText(textResId);
        mToast.show();
    }
}
